import axios from 'axios'

const http = axios.create({
  baseURL: 'http://127.0.0.1:8088/',
  timeout: 3000,
  responseType: 'json'
})

http.interceptors.request.use(config => {
  return config
})

http.interceptors.response.use(res => {
  if (res.status === 200) return res.data
})

export default http
